file = open('./ip.xml', 'w')

file.write('<config>\n')
for i in range(64):
    for j in range(8):
        ipseg3 = int((i*8 + j + 1) / 256)
        ipseg4 = (i*8 + j + 1) % 256
        line = str("<interface hosts=\"**.AIServer["+ str(i) +"].nic["+ str(j) +"].nic_inet\" address=\"192.168."+ str(ipseg3) +"."+ str(ipseg4) +"\" netmask=\"255.255.0.0\"/>\n")
        file.write(line)
file.write('</config>\n')
